<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>获取鼠标位置</title>
    <script src="../js/juqery.js"></script>
    <style>
        #divmove{
            width: 500px;
            height: 500px;
            border: 1px solid red;
        }
    </style>
</head>
<body>
    mouse:<span id="mouseMove"></mouse:span>
    <div id="divmove">点击这里试试</div>
</body>
<script>
    $(function(){
        $('#divmove').mouseover(function(e){
            $("#mouseMove").text('x:'+e.pageX+'y:'+e.pageY)
        })
    })
</script>
</html>